package me.zhengjie.modules.rest.intell;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.AnonymousAccess;
import me.zhengjie.modules.domain.intellectual.Website;
import me.zhengjie.modules.service.intell.WebsiteService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api("企业网站信息api")
@RestController
@RequiredArgsConstructor
@RequestMapping("/web")
public class WebsiteController {

    private final WebsiteService websiteService;

    @AnonymousAccess
    @ApiOperation("根据企业名称查询网站备案信息")
    @GetMapping("/queryWebsiteByName")
    public List<Website> queryWebsiteByName(String name){
        return websiteService.queryWebsiteByName(name);
    }

}
